<%@page import="java.util.ArrayList"%>
<%@page import="java.util.TreeMap"%>
<%@page import="debugs.DomainDebug"%>
<%@page import="entities.Domain"%>
<%
Domain domain = (Domain) request.getAttribute("domain");
TreeMap<String, String> check = (TreeMap<String, String>) request.getAttribute("check");
String description = (String) request.getAttribute("description");
String keywords = (String) request.getAttribute("keywords");
String title = (String) request.getAttribute("title");
ArrayList<String> domains = (ArrayList<String>) request.getAttribute("domains");
%>

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/layouts/header.jsp">
    <jsp:param name="title" value="<%=title %>" />
    <jsp:param name="description" value="<%=description %>" />
    <jsp:param name="keywords" value="<%=keywords %>" />
</jsp:include>

		<% if (!domain.getWhois().isEmpty()) { %>
		<h1><a href="/out/<%=domain.getDomain()%>"><%=domain.getDomain() %></a> - Whois Data</h1>
		<div id="content">
			<!-- adv -->
			<div class="adv">
				<script type="text/javascript"><!--
				google_ad_client = "ca-pub-1271973886625217";
				/* domainworlds 336x280 */
				google_ad_slot = "4751386823";
				google_ad_width = 336;
				google_ad_height = 280;
				//-->
				</script>
				<script type="text/javascript"
				src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
				</script>
				
				<br />
				
				<script type="text/javascript"><!--
				google_ad_client = "ca-pub-1271973886625217";
				/* 5ty 250 */
				google_ad_slot = "1623759201";
				google_ad_width = 250;
				google_ad_height = 250;
				//-->
				</script>
				<script type="text/javascript"
				src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
				</script>
			</div>
			<!-- end adv -->
			
			<!-- whois -->
			<div class="whois">
				<%=domain.getWhois() %>
			</div>
			<!-- end whois -->
		</div>
		<% } else { %>
		<h1><%=domain.getDomain().isEmpty() ? "Whois Data?" : domain.getDomain() %></h1>
		<div id="content">
			<% if(domain.getDomain().isEmpty() ) { %>
				<h3 align="center">Provide full service whois information for domain!</h3>
			<% } else if ( check.get("name") != null ) { %>
				<h3 align="center"><%=check.get("name") %></h3>
			<% } else { %>
			 	<h3 align="center">The remote whois server did not return any information about the domain <%=domain.getDomain() %>!</h3>
			<% } %>
			
			<% if (domains != null) { %>
				<div class="lst-domain">
					<br />
					<strong>Recent domain view :</strong>
					<ul>
						
					<% 
						for (int i = 0; i < domains.size(); i++) {
							if (i > 14) break;
					%>
						<li>
							<a href="/whois/<%=domains.get(i)%>"><%=domains.get(i)%></a>
						</li>
					<% 	
						} %>
					</ul>
				</div>
			<% } %>
			
			<br />
			<div class="adv2" align="center">
				
				<script type="text/javascript"><!--
					google_ad_client = "ca-pub-1271973886625217";
					/* ads-logo */
					google_ad_slot = "4064502460";
					google_ad_width = 468;
					google_ad_height = 60;
					//-->
					</script>
					<script type="text/javascript"
						src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
					</script>
					
				<br />
				
				<script type="text/javascript"><!--
				google_ad_client = "ca-pub-1271973886625217";
				/* domainworlds 336x280 */
				google_ad_slot = "4751386823";
				google_ad_width = 336;
				google_ad_height = 280;
				//-->
				</script>
				<script type="text/javascript"
				src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
				</script>
				
			</div>
			<div style="clear: both;"></div>
		</div>
		<% } %>
		
<jsp:include page="/layouts/footer.jsp" />